package sharedData;

/**
 * Inherits from {@link ADataItem}.
 * Contains robot position and <b>U</b>ltra<b>S</b>onic <b>S</b>ensor <b>R</b>eading data.
 * @author Didzis Petkus, Danny Johansen, Liviu Berheci
 * 
 */
public class MapData extends ADataItem {

	private float leftUSSR;
	private float rightUSSR;
	private float centerUssr;

	/**
	 * Constructs new MapData object with given parameters
	 * @param type - byte data type
	 * @param x - float x coordinate
	 * @param y - float y coordinate
	 * @param heading - float heading
	 * @param leftUSSR - float left <b>U</b>ltra<b>S</b>onic <b>S</b>ensor <b>R</b>eading
	 * @param rightUSSR - float right <b>U</b>ltra<b>S</b>onic <b>S</b>ensor <b>R</b>eading
	 * @param centerUSSR - float middle <b>U</b>ltra<b>S</b>onic <b>S</b>ensor <b>R</b>eading
	 */
	public MapData(byte type, float x, float y, float heading, float leftUSSR,
			float rightUSSR, float centerUSSR) {
		super(type, x, y, heading);

		this.leftUSSR = leftUSSR;
		this.rightUSSR = rightUSSR;
		this.centerUssr = centerUSSR;
	}

	/**
	 * Returns the left <b>U</b>ltra<b>S</b>onic <b>S</b>ensor <b>R</b>eading
	 * 
	 * @return - float Left USSR
	 */
	public float getLeftUssr() {
		return leftUSSR;
	}

	/**
	 * Returns the right <b>U</b>ltra<b>S</b>onic <b>S</b>ensor <b>R</b>eading
	 * 
	 * @return - float right USSR
	 */
	public float getRightUssr() {
		return rightUSSR;
	}

	/**
	 * Returns the middle <b>U</b>ltra<b>S</b>onic <b>S</b>ensor <b>R</b>eading
	 * 
	 * @return - float middle USSR
	 */
	public float getCenterUssr() {
		return centerUssr;
	}

}
